﻿#pragma once

#include <string>

constexpr auto OPERATOR = -1;
constexpr auto ENGINEER = -2;
constexpr auto ADMINISTRATOR = -3;
// LoginDlg 对话框

class CLoginDlg : public CDialogEx
{
	DECLARE_DYNAMIC(CLoginDlg)
private:
	char* _workingDirectory;
	HICON m_hIcon;
public:
	CLoginDlg(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CLoginDlg();	
	void CreateDefaultUserInfo(std::string path, std::string content = "");//创建默认的用户名和密码文件
	void CreateDefaultUserInfo(bool isSetDefualtInfos = true);
	void Close();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_LOGIN };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedExit();
	afx_msg void OnBnClickedComfirm();
	CComboBox m_cbUserList;
	CEdit m_txtPassword;
	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedModify();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};
